package com.bytz.modules.cms.reseller.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bytz.modules.cms.reseller.entity.ResellerSales;
import com.bytz.modules.cms.reseller.model.ResellerModel;
import com.bytz.modules.cms.reseller.model.ResellerSalesModel;
import com.bytz.modules.cms.reseller.model.ResellerSalesProductLine;

import java.util.List;

/**
 * <p>
 * 莱宝CMS—经销商管理—经销商/销售人员关联表 服务类
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
public interface IResellerSalesService extends IService<ResellerSales> {

    /**
     * 查询当前登录经销商的需方列表
     */
    List<ResellerSalesModel> getSalesByResellerId(String resellerId);

    /**
     * 根据经销商和销售id获取销售model
     */
    ResellerSalesModel getSalesByResellerIdAndSaleId(String saleId, String resellerId);

    /**
     * 根据经销商id获取销售列表
     */
    List<ResellerSales> getByResellerId(String resellerId);

    /**
     * 根据销售id和经销商id查找对应的销售和产品线信息
     */
    ResellerSalesProductLine getSalesAndProductLine(String saleId, String resellerId);

    /**
     * 根据model保存销售信息
     */
    void saveSalesByResellerModel(ResellerModel saveRo);
}